/*
 * Copyright 2008, James E. Kleckner

  This file is part of spread-excel.

  spread-excel is free software: you can redistribute it and/or modify
  it under the terms of the GNU Lesser General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  spread-excel is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
*/

#include "sp.h"
#include "string.h"
#include "assert.h"
#include <stdio.h>

static  mailbox s_mbox;
static  char    s_private_group[MAX_GROUP_NAME];

int
main(int argc, char **argv)
{
    int ret;
#if 1
    char *mess = "hello from teststatic";
    ret = SP_connect("4803@localhost", "teststatic", 0, 0, &s_mbox, s_private_group);
    printf("teststatic: SP_connect('4803@localhost', 'teststatic', 0, 0, &s_mbox, s_private_group), %d, %s\n", ret, s_private_group );
    ret = SP_multicast( s_mbox, FIFO_MESS, "foo",       1, strlen(mess), mess );
    printf("teststatic: SP_multicast( s_mbox, FIFO_MESS, 'foo',       1, strlen('%s'), '%s' ) %d\n", mess, mess, ret );
    ret = SP_multicast( s_mbox, FIFO_MESS, "exceltest",       1, strlen(mess), mess );
    printf("teststatic: SP_multicast( s_mbox, FIFO_MESS, 'exceltest',       1, strlen('%s'), '%s' ) %d\n", mess, mess, ret );

#endif
    return 0;
}
